text = """
请联系我们：
电话: 138-1234-5678
备用电话: (086) 028-8765-4321
邮箱: contact@company.com
客服邮箱: support@company.cn
紧急联系: 13987654321
QQ号码: 2339740450
"""
import re

def extract_contact_info(text):
    # 提取手机号码
    phone_pattern = r'1[3-9]\d{9}'
    phones = re.findall(phone_pattern, text)
    
    # 提取带格式的电话
    formatted_phone_pattern = r'\d{3}-\d{4}-\d{4}'
    formatted_phones = re.findall(formatted_phone_pattern, text)
    
    # 提取邮箱
    email_pattern = r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b'
    emails = re.findall(email_pattern, text)
    
    qq_pattern = r'[1-9]\d{4,10}'
    qq_numbers = re.findall(qq_pattern, text)
    
    return {
        'phones': phones,
        'formatted_phones': formatted_phones,
        'emails': emails,
        'qq_numbers': qq_numbers
    }

# 提取信息
contact_info = extract_contact_info(text)
print("提取的联系信息:")
print(f"手机号码: {contact_info['phones']}")
print(f"格式电话: {contact_info['formatted_phones']}")
print(f"邮箱地址: {contact_info['emails']}")
print(f"QQ号码: {contact_info['qq_numbers']}")

# Output:提取的联系信息:
# 手机号码: ['13987654321']
# 格式电话: ['138-1234-5678', '028-8765-4321']
# 邮箱地址: ['contact@company.com', 'support@company.cn']
# QQ号码: ['13987654321', '2339740450']